﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="_619BJP.Models"%>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	619保健品点评网 - <%=ViewData["Title"]%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../../Content/css/Instance/Article/ArticleDetails.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/css/Component/jquery-ui/jquery.ui.tabs.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Component/jquery-1.6.2.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.ui.tabs.js" type="text/javascript"></script>
    <script src="../../Scripts/Instance/Article/keyWordList.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs({
                event: "mouseover"
            });
        });
	</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<% ArticleModel articel = (ArticleModel)ViewData.Model;%>

    <div id="navigation">
        <span>你现在的位置： <a href="/Home/Index">首页</a> ></span> 
        <span > <a href="/Article/ArticleIndex">保健百科</a> ></span>
        <span > <a href="/Article/ArticleList/<%=articel.category_id %>"><%=Html.Encode(articel.category_name)%></a> ></span>
        <span > <a href="#" class="current_nav"><%=Html.Encode(articel.title)%></a></span>
    </div>

    <div id="article_detail">
        <div id="article_title"><%=Html.Encode(articel.title)%></div>
        <div id="article_info">
            <span>发布: <%=Html.Encode(articel.created_time)%></span> |
            <span>来源:619保健品点评网</span> |
            <span>作者: <%=Html.Encode(articel.created_name)%></span> |
            <span>查看: <%=Html.Encode(articel.view_count)%>次</span>
        </div>
        <div id="article"><%=articel.content%></div>
        <div id="article_other">
            <%ArticleModel pre_a = (new _619BJP.Web.Controllers.ArticleController()).PreArticle(articel.ArticleID);
              {
                  if (pre_a.ArticleID != 0)
                  {%><a href="/Article/ArticleDetails/<%=pre_a.ArticleID %>" id="pre_article"><%=pre_a.title%></a><%}
                  else
                  {%><a href="" id="pre_article"><%=pre_a.title%></a><%}
              } %>
            <%ArticleModel next_a = (new _619BJP.Web.Controllers.ArticleController()).NextArticle(articel.ArticleID);
              {
                  if (next_a.ArticleID != 0)
                  {%><a href="/Article/ArticleDetails/<%=next_a.ArticleID %>" id="next_article"><%=next_a.title%></a><%}
                  else
                  {%><a href="" id="next_article"><%=next_a.title%></a><%}
              } %>
            
        </div>
    </div> 

    <div id="article_recommend">
        <div class="title">精彩推荐</div>
        <div id="tabs">
            <ul id="recomment_tab">
                <li id="tab_new"><a href="#article_new_list">最 新</a></li>
                <li id="tab_hot"><a href="#article_hot_list">最 热</a></li>
            </ul>

            <div id="article_new_list" class="article_list">
            <ul>
                <%System.Data.DataSet ds_new = (new _619BJP.Web.Controllers.ArticleController()).GetNewArticle();
                  for (int i = 0; i < 3; i++)
                  {
                %>
                <li>
                    <div class="rank_num_top"><span><%=i + 1%></span></div>
                    <div class="article_name"> 
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_new.Tables[0].Rows[i]["id"])%>" title="<%=Html.Encode(ds_new.Tables[0].Rows[i]["title"]) %>">
                        <%string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_new.Tables[0].Rows[i]["title"]),14);%>
                        <%= title%>
                        </a>
                    </div>
                </li>
                <%}
                  for (int j = 3; j < 10; j++)
                  {
                %>
                <li>
                    <div class="rank_num"><span><%=j + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_new.Tables[0].Rows[j]["id"])%>" title="<%=Html.Encode(ds_new.Tables[0].Rows[j]["title"]) %>">
                        <%string title = Html.Encode(ds_new.Tables[0].Rows[j]["title"]);
                          if(title.Length>15){
                              title = title.Substring(0, 14) + " ...";
                          }%>
                        <%= title%>
                        </a>
                    </div>
                </li>
                <%} %>                 
            </ul>
        </div>

            <div id="article_hot_list" class="article_list">
            <ul>
                <%System.Data.DataSet ds_hot = (new _619BJP.Web.Controllers.ArticleController()).GetHotArticle();
                  for (int i = 0; i < 3; i++)
                  {
                %>
                <li>
                    <div class="rank_num_top"><span><%=i + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_hot.Tables[0].Rows[i]["id"])%>" title="<%=Html.Encode(ds_hot.Tables[0].Rows[i]["title"]) %>">
                            <%string title = Html.Encode(Html.Encode(ds_hot.Tables[0].Rows[i]["title"]));
                              if(title.Length>15){
                                  title = title.Substring(0, 14) + " ...";
                              }%>
                            <%= title%>
                        </a>
                    </div>
                </li>
                <%}
                  for (int j = 3; j < 10; j++)
                  {
                %>
                <li>
                    <div class="rank_num"><span><%=j + 1%></span></div>
                    <div class="article_name">
                        <a href="/Article/ArticleDetails/<%= Html.Encode(ds_hot.Tables[0].Rows[j]["id"])%>" title="<%=Html.Encode(ds_hot.Tables[0].Rows[j]["title"]) %>">
                            <%string title = Html.Encode(Html.Encode(ds_hot.Tables[0].Rows[j]["title"]));
                              if(title.Length>15){
                                  title = title.Substring(0, 14) + " ...";
                              }%>
                            <%= title%>
                        </a>
                    </div>
                </li>
                <%} %>                 
            </ul>
        </div>
        </div>
    </div>

    <div id="keyWord">
        <div class="title">热门搜索</div>
        <div id="keyWord_list">
            <a href="/0/日常">长寿保健</a> 
            <a href="/0/日常">日常保健</a> 
            <a href="/0/咖啡">咖啡保健</a> 
            <a href="/0/针灸">针灸保健</a> 
            <a href="/0/女性">女性保健</a> 
            <a href="/0/经期">经期保健</a> 
            <a href="/0/保健">保健方法</a> 
            <a href="/0/亚健康">亚健康保健</a> 
            <a href="/0/误区">保健误区</a> 
            <a href="/0/养生">养生保健</a> 
            <a href="/0/冬季">冬季保健</a> 
            <a href="/0/孕期">孕期保健</a> 
            <a href="/0/养生">保健养生</a> 
            <a href="/0/老年">老年保健</a> 
            <a href="/0/膳食">膳食保健</a> 
            <a href="/0/食疗">保健食疗</a> 
            <a href="/0/饮食">饮食保健</a> 
            <a href="/0/幼儿">幼儿保健</a> 
        </div>
    </div>

    <div id="ad_1">
        <img  src="../../AdImages/ad_1.jpg" alt=""/>
    </div>
</asp:Content>
